/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.statehome.util;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author Rodrigo
 */
public class UnidadePersistencia {

    private static EntityManager em = null;
    private static EntityManagerFactory emf = null;

    public UnidadePersistencia() {
      emf = Persistence.createEntityManagerFactory(null);
      em = emf.createEntityManager();
    }

    public  EntityManager getEm() {
        return em;
    }

}
